# Maintainer: Pierre Schmitz <pierre@archlinux.de>

pkgname=php-apcu-bc
pkgver=1.0.5
pkgrel=3
arch=('x86_64')
pkgdesc='APCu Backwards Compatibility Module'
url='https://pecl.php.net/package/apcu_bc'
depends=('php-apcu')
license=('PHP')
source=("https://pecl.php.net/get/apcu_bc-$pkgver.tgz")
md5sums=('8aa7b1c8aa613c6bc720fe785b21037b')

build() {
	cd $srcdir/apcu_bc-$pkgver

	phpize
	./configure --prefix=/usr
	make
}

check() {
	cd $srcdir/apcu_bc-$pkgver

	export REPORT_EXIT_STATUS=1
	export NO_INTERACTION=1
	export SKIP_ONLINE_TESTS=1
	export SKIP_SLOW_TESTS=1

	php -n run-tests.php -n -P -d extension=apcu.so -d extension=modules/apc.so
}

package() {
	cd $srcdir/apcu_bc-$pkgver

	make INSTALL_ROOT=$pkgdir install
}
